import request from '@/utils/request'

// 查询借用归还列表
export function listH(query) {
  return request({
    url: '/eam/loanBack/list',
    method: 'get',
    params: query
  })
}

// 查询借用归还详细
export function getH(loanBackId) {
  return request({
    url: '/eam/loanBack/' + loanBackId,
    method: 'get'
  })
}

// 新增借用归还
export function addH(data) {
  return request({
    url: '/eam/loanBack/addH',
    method: 'post',
    data: data
  })
}

// 新增借用归还
export function addD(data) {
  return request({
    url: '/eam/loanBack/addD',
    method: 'post',
    data: data
  })
}

// 修改借用归还
export function updateH(data) {
  return request({
    url: '/eam/loanBack/editH',
    method: 'put',
    data: data
  })
}

// 修改借用归还
export function updateD(data) {
  return request({
    url: '/eam/loanBack/editD',
    method: 'post',
    data: data
  })
}

// 删除借用归还
export function delH(data) {
  return request({
    url: '/eam/loanBack',
    method: 'delete',
    data:data
  })
}


// 查询资产类别列表
export const getTypeList = (query) => {
  return request({
    url: '/eam/loanBack/typeList/',
    method: 'get',
    params:query
  })
}

// 查询资产类别列表
export const getusuPersonList = (query) => {
  return request({
    url: '/eam/loanBack/userListByDeptId/',
    method: 'get',
    params:query
  })
}

// 查询资产列表
export const getEamList = (query) => {
  return request({
    url: '/eam/asset/list/',
    method: 'get',
    params:query
  })
}

// 修改资产
export const editUseStatus = (data) => {
  return request({
    url: '/eam/asset/editUseStatus',
    method: 'put',
    data:data
  })
}

// 查询借用归还列表
export function deptByUserId(query) {
  return request({
    url: '/eam/loanBack/deptByUserId',
    method: 'post',
    data: query
  })
}

// 查询借用归还列表
export function updateAsset(data) {
  return request({
    url: '/eam/loanBack/updateAsset',
    method: 'put',
    data: data
  })
}